<html>
<head><meta charset="utf-8"><title>Rust-for-linux and unstable features on beta? · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html">Rust-for-linux and unstable features on beta?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="245010148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245010148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245010148">(Jul 06 2021 at 08:40)</a>:</h4>
<p>I am super excited about <a href="https://lore.kernel.org/lkml/20210704202756.29107-1-ojeda@kernel.org/">https://lore.kernel.org/lkml/20210704202756.29107-1-ojeda@kernel.org/</a> ! However, this part of the announcement is somewhat concerning</p>
<blockquote>
<p>However, the kernel can now be compiled with beta and stable <code>rustc</code><br>
releases. At the moment, we are using the 1.54-beta1 version as our<br>
reference compiler. At the end of this month, <code>rustc</code> 1.54 will be<br>
released, and we will move to that version as our reference.</p>
<p>Note that the kernel still requires unstable features, even if it is<br>
compiled with a stable <code>rustc</code> release, thus we cannot guarantee that<br>
future <code>rustc</code> versions will work without changes to the kernel tree.</p>
</blockquote>
<p>so looks like we might soon have a major user heavily relying on the <code>RUSTC_BOOTSTRAP</code> hack? that seems bad. :( I am worried this might impact how we experiment with unstable features on nightly.</p>
<p>(I was not sure where to bring this up so this seemed like the least wrong place.^^)</p>



<a name="245011731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245011731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245011731">(Jul 06 2021 at 08:57)</a>:</h4>
<p>Imo that should be treated as if they were using nightly.</p>



<a name="245011917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245011917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245011917">(Jul 06 2021 at 08:59)</a>:</h4>
<p>That's what Firefox does or used to do, right?</p>



<a name="245012963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245012963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245012963">(Jul 06 2021 at 09:10)</a>:</h4>
<p>I feel like one conclusion we could draw all this is that we're leaving features unstable for too long. There are features that stay unstable for years and years, and that's not really healthy.</p>



<a name="245013035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245013035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245013035">(Jul 06 2021 at 09:11)</a>:</h4>
<p>There needs to be a more coordinated effort to work out the remaining details and stabilize (or remove) these features.</p>



<a name="245013050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245013050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245013050">(Jul 06 2021 at 09:11)</a>:</h4>
<p>Of course, easier said than done.</p>



<a name="245013421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245013421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245013421">(Jul 06 2021 at 09:15)</a>:</h4>
<p>I wonder if there's anything people can do to help features move towards stabilization...</p>



<a name="245013428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245013428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245013428">(Jul 06 2021 at 09:15)</a>:</h4>
<p>I think it also shows there's a need for a version of rust that does not come with stability guarantees (e.g. allows library features that might still be renamed or redesigned a bit), but is not the not-much-tested-yet nightly version of a few hours old.</p>



<a name="245013548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245013548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245013548">(Jul 06 2021 at 09:16)</a>:</h4>
<p>just like how we use the beta/bootstrap compiler ourselves for rustc. a somewhat proven version of the compiler of a few weeks old, but still with unstable features enabled.</p>



<a name="245013574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245013574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245013574">(Jul 06 2021 at 09:17)</a>:</h4>
<p>That sounds exactly like <code>stable</code> with <code>RUSTC_BOOTSTRAP=1</code>.</p>



<a name="245013600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245013600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245013600">(Jul 06 2021 at 09:17)</a>:</h4>
<p>yeah. except that that gets a lot of negative responses because it wasn't meant for that.</p>



<a name="245013668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245013668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245013668">(Jul 06 2021 at 09:18)</a>:</h4>
<p>rename it to RUSTC_UNSTABLE ?</p>



<a name="245013750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245013750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245013750">(Jul 06 2021 at 09:19)</a>:</h4>
<p><code>RUSTC_PREVIEW_OPTIN</code>?</p>



<a name="245013752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245013752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245013752">(Jul 06 2021 at 09:19)</a>:</h4>
<p>What would be the advantage of a separate build instead of using the env?</p>



<a name="245013760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245013760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245013760">(Jul 06 2021 at 09:19)</a>:</h4>
<p>well, it's been moving towards getting rid of the environment variable, or at least making it harder to enable.</p>



<a name="245013972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245013972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245013972">(Jul 06 2021 at 09:21)</a>:</h4>
<p>it might be nice to have a difference between 'unstable and untested your code might explode' and 'unstable, but we use it internally a lot we just haven't decided on the name yet'.</p>



<a name="245014085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245014085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245014085">(Jul 06 2021 at 09:22)</a>:</h4>
<p>You still need feature flags in your code and there's incomplete_features. The bootstrap flag itself doesn't buy you that much instability.</p>



<a name="245014113"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245014113" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245014113">(Jul 06 2021 at 09:23)</a>:</h4>
<p>because sometimes i'm working on a project where i need some nightly feature and i'm perfectly fine with it requiring some rename/changes in a future rust version, but i rather not use nightly rust with potential bugs.</p>



<a name="245014223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245014223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245014223">(Jul 06 2021 at 09:24)</a>:</h4>
<p>yeah i know we have incomplete_features, but there's a lot of features that are still at the point where we would really like people to not use them yet because we haven't figured out what it means for soundness or whether the implementation is fully correct, which aren't marked as incomplete_features.</p>



<a name="245014260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245014260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245014260">(Jul 06 2021 at 09:24)</a>:</h4>
<p>That still doesn't explain the difference between using stable + env vs. separate build from the same source as stable.</p>
<p>Do you mean it would only allow a subset of unstable features?</p>



<a name="245014464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245014464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245014464">(Jul 06 2021 at 09:26)</a>:</h4>
<p>the compiler team wanted a carrot to get people to use beta. maybe allowing some features (opt-in still required of course) there would be it.</p>



<a name="245014475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245014475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245014475">(Jul 06 2021 at 09:26)</a>:</h4>
<p>yeah, maybe. just enable the "we won't promise the api stays the same" features, but not enable "we won't guarantee this works or there's no big footguns" features.</p>



<a name="245014670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245014670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245014670">(Jul 06 2021 at 09:28)</a>:</h4>
<p>semistable features!</p>



<a name="245014741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245014741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245014741">(Jul 06 2021 at 09:29)</a>:</h4>
<p>Bikeshed: I'd avoid "unstable" because it tends to attract a lot of low-effort commentary in the lines of "why would you use an unstable language?"</p>



<a name="245014836"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245014836" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245014836">(Jul 06 2021 at 09:30)</a>:</h4>
<p>I think that negative aura is useful so people are aware that extra maintenance burden comes with using that. It's not like the language is unstable, just certain features you opt into.</p>



<a name="245014939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245014939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245014939">(Jul 06 2021 at 09:31)</a>:</h4>
<p>I'm not sure if it would help the kernel project though, they're upstreaming experimental stuff. Would that immediately be allowed on beta? Otherwise they'd still have to wait or use the bootstrap hack.</p>



<a name="245014986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245014986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245014986">(Jul 06 2021 at 09:32)</a>:</h4>
<p>would be interesting to know which features they need</p>



<a name="245015246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245015246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245015246">(Jul 06 2021 at 09:34)</a>:</h4>
<p><a href="https://github.com/Rust-for-Linux/linux/issues/2">https://github.com/Rust-for-Linux/linux/issues/2</a></p>



<a name="245015313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245015313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Urgau <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245015313">(Jul 06 2021 at 09:35)</a>:</h4>
<p>They have such list: <a href="https://github.com/Rust-for-Linux/linux/issues/355">rustc</a> - <a href="https://github.com/Rust-for-Linux/linux/issues/408">alloc</a> - <a href="https://github.com/Rust-for-Linux/linux/issues/353">bindgen</a> and <a href="https://github.com/Rust-for-Linux/linux/issues/350">rustdoc</a></p>



<a name="245015353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245015353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245015353">(Jul 06 2021 at 09:36)</a>:</h4>
<p>nice</p>



<a name="245015510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245015510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245015510">(Jul 06 2021 at 09:37)</a>:</h4>
<p>seems incomplete though?</p>



<a name="245015677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245015677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Urgau <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245015677">(Jul 06 2021 at 09:39)</a>:</h4>
<p><span class="user-mention" data-user-id="330154">@The 8472</span> posted the link to the <a href="https://github.com/Rust-for-Linux/linux/issues/2">language features they want</a></p>



<a name="245015812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245015812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245015812">(Jul 06 2021 at 09:40)</a>:</h4>
<div class="codehilite"><pre><span></span><code>alloc_error_handler
allocator_api
associated_type_defaults
compiler_builtins
const_fn_trait_bound
const_mut_refs
const_panic
const_raw_ptr_deref
const_unreachable_unchecked
core_panic
global_asm
receiver_trait
try_reserve
</code></pre></div>
<p>by my count in those patches.</p>



<a name="245016127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245016127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245016127">(Jul 06 2021 at 09:44)</a>:</h4>
<p>Your list doesn't cover unstable rustc and cargo flags. and the falliable alloc or no-float-parsing configs in core/alloc.</p>



<a name="245016302"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245016302" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245016302">(Jul 06 2021 at 09:46)</a>:</h4>
<p><a href="https://github.com/Rust-for-Linux/linux/issues/416">Rust-for-Linux/linux#416</a> uses <code>-Zunstable-features</code> to limit the features usable by driver code to just those that are necessary:</p>
<ul>
<li>allocator_api</li>
<li>bench_black_box</li>
<li>concat_idents</li>
<li>global_asm</li>
<li>try_reserve</li>
</ul>
<p>In <a href="https://github.com/Rust-for-Linux/linux/issues/404">Rust-for-Linux/linux#404</a> I suggested to use <code>RUSTC_BOOTSTRAP="crate list"</code> to completely prevent unstable features in all crates except for those that need it.</p>



<a name="245016564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245016564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245016564">(Jul 06 2021 at 09:49)</a>:</h4>
<p>Currently a manual allocator shim is created by rust-for-linux. This is an implementation detail that is only generated when you let rustc do the linking. <a href="https://github.com/Rust-for-Linux/linux/issues/426">Rust-for-Linux/linux#426</a> removed a part that isn't necessary anymore due to aborting on oom being disabled in liballoc by rust-for-linux. <a href="https://github.com/rust-lang/rust/issues/86844">#86844</a> will remove the need for the rest of the allocator shim when using <code>#[global_allocator]</code> instead of libstd's default allocator.</p>



<a name="245016871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245016871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245016871">(Jul 06 2021 at 09:53)</a>:</h4>
<p><span class="user-mention silent" data-user-id="203546">Laurențiu</span> <a href="#narrow/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F/near/245015812">said</a>:</p>
<blockquote>
<div class="codehilite"><pre><span></span><code>alloc_error_handler
allocator_api
associated_type_defaults
compiler_builtins
const_fn_trait_bound
const_mut_refs
const_panic
const_raw_ptr_deref
const_unreachable_unchecked
core_panic
global_asm
receiver_trait
try_reserve
</code></pre></div>
<p>by my count in those patches.</p>
</blockquote>
<p><code>alloc_error_handler</code> is no longer necessary. I will open an issue. Edit: <a href="https://github.com/Rust-for-Linux/linux/issues/431">Rust-for-Linux/linux#431</a></p>



<a name="245017364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245017364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245017364">(Jul 06 2021 at 09:58)</a>:</h4>
<p><code>receiver_trait</code> is used for <code>impl&lt;T: ?Sized&gt; Receiver for Ref&lt;T&gt; {}</code>.</p>



<a name="245017411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245017411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245017411">(Jul 06 2021 at 09:58)</a>:</h4>
<p><code>try_reserve</code> and <code>allocator_api</code> are used because many <code>try_*</code> methods aren't stabilized yet.</p>



<a name="245017743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245017743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245017743">(Jul 06 2021 at 10:02)</a>:</h4>
<p><code>global_asm!</code> is used in the <code>module!()</code> macro to define kernel modules. It needs it for builtin-modules to extend the initcall section:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="o">+</span><span class="w">            </span><span class="cp">#[cfg(not(MODULE))]</span><span class="w"></span>
<span class="o">+</span><span class="w">            </span><span class="cp">#[cfg(CONFIG_HAVE_ARCH_PREL32_RELOCATIONS)]</span><span class="w"></span>
<span class="o">+</span><span class="w">            </span><span class="fm">global_asm!</span><span class="p">(</span><span class="w"></span>
<span class="o">+</span><span class="w">                </span><span class="n">r</span>#<span class="err">\</span><span class="s">".section </span><span class="se">\"</span><span class="s">{initcall_section}</span><span class="se">\"</span><span class="s">, </span><span class="se">\"</span><span class="s">a</span><span class="se">\"</span><span class="s"></span>
<span class="s">+                __{name}_initcall:</span>
<span class="s">+                    .long   __{name}_init - .</span>
<span class="s">+                    .previous</span>
<span class="s">+                </span><span class="se">\"</span><span class="s">#</span>
<span class="s">+            );</span>
</code></pre></div>



<a name="245018116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245018116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245018116">(Jul 06 2021 at 10:06)</a>:</h4>
<p><code>compiler_builtins</code> is required as every crate depends on compiler-builtins unless <code>#![no_builtins]</code> is used. rust-for-linux uses a dummy compiler-builtins that panics for all operations. To make rustc treat it as "the" compiler-builtins, it needs to be marked with <code>compiler_builtins</code>.</p>
<p>Now that I think of it, maybe <code>#![no_builtins]</code> would just work.</p>



<a name="245018270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245018270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245018270">(Jul 06 2021 at 10:07)</a>:</h4>
<p>No, that would require liballoc to be <code>#![no_builtins]</code> too.</p>



<a name="245018877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245018877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245018877">(Jul 06 2021 at 10:14)</a>:</h4>
<p><code>core_panic</code> is used since <a href="https://github.com/Rust-for-Linux/linux/issues/257">Rust-for-Linux/linux#257</a> because <code>const_panic</code> doesn't work in the 2018 edition, which I believe is also the reason <code>const_panic</code> isn't stabilized yet.</p>



<a name="245018916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245018916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245018916">(Jul 06 2021 at 10:15)</a>:</h4>
<p><code>const_unreachable_unchecked</code> will likely be stabilized at the same time as <code>const_panic</code>.</p>



<a name="245019017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245019017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245019017">(Jul 06 2021 at 10:16)</a>:</h4>
<p><code>bench_black_box</code> is only used in the <code>rust_stack_probing</code> module to ensure that there is no linker error when stack probing would normally be used.</p>



<a name="245019288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245019288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245019288">(Jul 06 2021 at 10:20)</a>:</h4>
<p><code>associated_type_defaults</code> may be removable at the cost of ergonomics, but the rest of the <code>const_*</code> features will hopefully be stabilized soonish.</p>



<a name="245030602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245030602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245030602">(Jul 06 2021 at 12:26)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> <a href="#narrow/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F/near/245018877">said</a>:</p>
<blockquote>
<p><code>core_panic</code> is used since <a href="https://github.com/Rust-for-Linux/linux/issues/257">Rust-for-Linux/linux#257</a> because <code>const_panic</code> doesn't work in the 2018 edition, which I believe is also the reason <code>const_panic</code> isn't stabilized yet.</p>
</blockquote>
<p>2021 edition right?</p>



<a name="245035245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245035245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245035245">(Jul 06 2021 at 13:04)</a>:</h4>
<p>yeah, my bad.</p>



<a name="245035731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245035731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245035731">(Jul 06 2021 at 13:08)</a>:</h4>
<p>No worries, I just wanted to be sure because I am looking forward for this feature to be stabilized :)</p>



<a name="245063769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Rust-for-linux%20and%20unstable%20features%20on%20beta%3F/near/245063769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F.html#245063769">(Jul 06 2021 at 16:25)</a>:</h4>
<p><span class="user-mention silent" data-user-id="310399">Mara</span> <a href="#narrow/stream/122651-general/topic/Rust-for-linux.20and.20unstable.20features.20on.20beta.3F/near/245013548">said</a>:</p>
<blockquote>
<p>just like how we use the beta/bootstrap compiler ourselves for rustc. a somewhat proven version of the compiler of a few weeks old, but still with unstable features enabled.</p>
</blockquote>
<p>I wouldnt say that's how we use it.<br>
we use bootstraping to make sure the current stable compiler builds with the previous stable compiler, so that e.g. distros can reasonably follow the bootstrap chain.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>